const apiBaseUrl = 'http://127.0.0.1:8082'

export function request(options) {
	return new Promise((resolve,reject)=>{
		uni.request({
			url:apiBaseUrl + options.url,
			data:options.data || {},
			method:options.method || 'GET',
			header:{
				// 'Content-Type':'application/json;charset-UTF-8',
				'Authorization':uni.getStorageSync('token')
			},
			success(res){
				resolve(res.data)
			},
			fail(err){
				reject(err)
			}
		})
	})
}